package com.stsdai.order.redis.impl;

import org.springframework.beans.factory.annotation.Autowired;

import com.stsdai.order.redis.RedisService;

import redis.clients.jedis.JedisCluster;

public class JedisClusterServiceImpl implements RedisService {

	@Autowired
	public JedisCluster jedisCluster;
	
	@Override
	public void set(String key, String value) {
		jedisCluster.set(key, value);
	}

	@Override
	public String get(String key) {
		String value = jedisCluster.get(key);
		return value;
	}

	@Override
	public void expire(String key, Integer seconds) {
		jedisCluster.expire(key, seconds);
	}

	@Override
	public void del(String key) {
		jedisCluster.del(key);
	}

	@Override
	public Long incr(String key) {
		Long value = jedisCluster.incr(key);
		return value;
	}

}
